<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.3.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/font-awesome.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"example.com","root":"/","scheme":"Muse","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},"path":"search.json"};
  </script>

  <meta name="description" content="​        关于FFT补零的作用主要看了网友的文章，写的比较好，原文链接：http:&#x2F;&#x2F;blog.sciencenet.cn&#x2F;blog-425437-1043431.html https:&#x2F;&#x2F;blog.csdn.net&#x2F;weixin_35841706&#x2F;article&#x2F;details&#x2F;116255216?spm&#x3D;1001.2101.3001.6650.1&amp;utm_medium&#x3D;dist">
<meta property="og:type" content="article">
<meta property="og:title" content="FFT补零的作用">
<meta property="og:url" content="http://example.com/2021/11/22/FFT%E8%A1%A5%E9%9B%B6%E7%9A%84%E4%BD%9C%E7%94%A8/index.html">
<meta property="og:site_name" content="学无止境">
<meta property="og:description" content="​        关于FFT补零的作用主要看了网友的文章，写的比较好，原文链接：http:&#x2F;&#x2F;blog.sciencenet.cn&#x2F;blog-425437-1043431.html https:&#x2F;&#x2F;blog.csdn.net&#x2F;weixin_35841706&#x2F;article&#x2F;details&#x2F;116255216?spm&#x3D;1001.2101.3001.6650.1&amp;utm_medium&#x3D;dist">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/1950003w2s7j75sgy15ss4.jpg">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/195000zmdsllipieuemssu.jpg">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/微信截图_20211122144913.png">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/195312i0ddrratq0xtnvn0.jpg">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/19543246d6wwdogzm99jwq.jpg">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/1954322pwt54p93evzvtvv.jpg">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/微信截图_20211122163925.png">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/1956551mevdmemqoim1fev.jpg">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/195655gmzuxgqg6m6xyz5q.jpg">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/195843v40p5fizttv54igf.jpg">
<meta property="article:published_time" content="2021-11-22T05:35:09.000Z">
<meta property="article:modified_time" content="2021-11-22T05:35:09.000Z">
<meta property="article:author" content="xudonglei">
<meta property="article:tag" content="信号处理">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/1950003w2s7j75sgy15ss4.jpg">

<link rel="canonical" href="http://example.com/2021/11/22/FFT%E8%A1%A5%E9%9B%B6%E7%9A%84%E4%BD%9C%E7%94%A8/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>FFT补零的作用 | 学无止境</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">学无止境</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
      <p class="site-subtitle" itemprop="description">Do not bb, show me the example</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-fw fa-home"></i>首页</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="fa fa-fw fa-tags"></i>标签</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="fa fa-fw fa-th"></i>分类</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-fw fa-archive"></i>归档</a>

  </li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup">
        <div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off"
           placeholder="搜索..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div id="search-result">
  <div id="no-result">
    <i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>
  </div>
</div>

    </div>
  </div>

</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://example.com/2021/11/22/FFT%E8%A1%A5%E9%9B%B6%E7%9A%84%E4%BD%9C%E7%94%A8/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="xudonglei">
      <meta itemprop="description" content="搬砖 嵌入式">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="学无止境">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          FFT补零的作用
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2021-11-22 13:35:09" itemprop="dateCreated datePublished" datetime="2021-11-22T13:35:09+08:00">2021-11-22</time>
            </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/%E6%9D%82/" itemprop="url" rel="index"><span itemprop="name">杂</span></a>
                </span>
            </span>

          
            <span id="/2021/11/22/FFT%E8%A1%A5%E9%9B%B6%E7%9A%84%E4%BD%9C%E7%94%A8/" class="post-meta-item leancloud_visitors" data-flag-title="FFT补零的作用" title="阅读次数">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              <span class="post-meta-item-text">阅读次数：</span>
              <span class="leancloud-visitors-count"></span>
            </span>
  
  <span class="post-meta-item">
    
      <span class="post-meta-item-icon">
        <i class="fa fa-comment-o"></i>
      </span>
      <span class="post-meta-item-text">Valine：</span>
    
    <a title="valine" href="/2021/11/22/FFT%E8%A1%A5%E9%9B%B6%E7%9A%84%E4%BD%9C%E7%94%A8/#valine-comments" itemprop="discussionUrl">
      <span class="post-comments-count valine-comment-count" data-xid="/2021/11/22/FFT%E8%A1%A5%E9%9B%B6%E7%9A%84%E4%BD%9C%E7%94%A8/" itemprop="commentCount"></span>
    </a>
  </span>
  
  

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <p>​        关于FFT补零的作用主要看了网友的文章，写的比较好，原文链接：<a target="_blank" rel="noopener" href="http://blog.sciencenet.cn/blog-425437-1043431.html">http://blog.sciencenet.cn/blog-425437-1043431.html</a></p>
<p><a target="_blank" rel="noopener" href="https://blog.csdn.net/weixin_35841706/article/details/116255216?spm=1001.2101.3001.6650.1&amp;utm_medium=distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-1.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-1.no_search_link">https://blog.csdn.net/weixin_35841706/article/details/116255216?spm=1001.2101.3001.6650.1&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-1.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-1.no_search_link</a></p>
<h3 id="什么是补零"><a href="#什么是补零" class="headerlink" title="什么是补零"></a>什么是补零</h3><p>​        补零(Zero Padding)就是对变换前的时域或空域信号的尾部添加若干个0，以增加数据长度。下图为含有1.00 MHz 和1.05 MHz 两个频率成分合成的正弦波实信号</p>
<img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/1950003w2s7j75sgy15ss4.jpg" style="zoom:80%;">

<img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/195000zmdsllipieuemssu.jpg" style="zoom:80%;">

<p>​        上图中信号长度为1000个样点，采样频率为<em>f</em>s=100 MHz时，信号的实际时长则为10 us。在其尾部添加1000个0，即数据增加到了2000个点（时长为20us）。</p>
<h3 id="波形分辨率和FFT分辨率"><a href="#波形分辨率和FFT分辨率" class="headerlink" title="波形分辨率和FFT分辨率"></a>波形分辨率和FFT分辨率</h3><p>​        波形频率分辨率是指可以被分辨的2个频率的最小间隔，其由原始数据的时间长度决定：Δ<em>Rw</em>= 1/<em>T</em>，其中，<em>T</em>是实际信号的时间长度。</p>
<p>​        FFT分辨率，其由采样频率和参与FFT的数据点数决定，可以定义为：Δ<em>Rf</em>= <em>f</em>s/<em>Nfft</em>，其中，<em>fs</em>为采样频率（the sampling frequency），<em>Nfft</em>为FFT的点数。Δ<em>Rf</em>代表了FFT频率轴上的频率取值的间隔（Spacing）。</p>
<p>​        之所以要区分，就是因为后面要进行“补零”的操作。如果不补零，直接对原始数据做FFT，那么这两种分辨率是类似的。例如上面，有：</p>
<img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/微信截图_20211122144913.png" style="zoom:50%;">

<p>​        值得注意的是，可能有很好的FFT分辨率，但却不一定能够很好的把2个频率成分简单的分开。同样，可能有很高的波形分辨率，但波形的能量峰值会通过整个频谱而分散开（这是因为FFT的频率泄漏现象）。</p>
<h3 id="实例分析"><a href="#实例分析" class="headerlink" title="实例分析"></a>实例分析</h3><p><strong>1.时域信号1000个点采样，做相同样点数的FFT</strong></p>
<img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/195312i0ddrratq0xtnvn0.jpg" style="zoom:67%;">

<p>​        可以发现，频谱点稀疏，在1MHz附近根本无法将1 MHz和1.05 MHz的两个频率分开。</p>
<p><strong>2.时域信号1000个点采样，后端补6000个零，做7000点数的FFT</strong></p>
<img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/19543246d6wwdogzm99jwq.jpg" style="zoom:67%;">

<img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/1954322pwt54p93evzvtvv.jpg" style="zoom:67%;">

<p>可以发现，频谱点密集了太多，但是在1MHz附近依然无法将1MHz和1.05MHz的两个频率分量分开。这是因为波形分辨率<strong>只与原始数据的时长T</strong>相关，而与参与FFT的数据点数无关。虽然补补了很多零，但波形分辨率依然为1 /10μs= 100 kHz，该分辨率大于1MHz和1.05MHz这两个频率之间的距离50 kHz。</p>
<p>​        而“时域补零等于频域插值”，补零操作增加了频域的插值点数，让频域曲线看起来更加平滑，也就是增加了FFT频率分辨率。</p>
<p>​        关于把两个频率接近的波形区分开来，也可以看下面这个截图：</p>
<img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/微信截图_20211122163925.png" style="zoom:70%;">

<p><strong>3.时域信号7000个点采样，做7000点数的FFT</strong></p>
<p>​        根据上面的分析可知，在采样频率不变的情况下，要想将1MHz和1.05MHz这两个频率成分分析出来，光靠“补零”是不够的，<strong>必须要改变波形分辨率，也就是要延长原始数据的时长</strong>。现在以相同的采样频率对信号采7000个点作为原始信号：</p>
<p>​        因此，我们直接采集波形的7000点作为输入信号，取代补零（Zero Padding）方式到 70us (7000 点) 。</p>
<img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/1956551mevdmemqoim1fev.jpg" style="zoom:67%;">

<img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/195655gmzuxgqg6m6xyz5q.jpg" style="zoom:67%;">

<p>​        因为此时的波形分辨率为：1 /70μs≈14kHz，小于1MHz和1.05MHz这两个频率之中的距离50 kHz，所以可以看到有两个明显的突起。但是在1.05MHz对应的幅值周围的点上却都有不小的幅值，原因就是1.05 MHz处并没有FFT点的分布，原因是此处的能量被多个FFT点分散（泄露）了。因为采样频率是100 MHz，FFT点数为7000。频谱图中，点与点之间的间隔是14.28 kHz。1 MHz频率刚好为频率间隔的整数陪，而1.05 MHz 却不是。距1.05 MHz最近的整数倍频率为1.043 MHz 和1.057 MHz, 因此，能量被这2个FFT单元所分散。</p>
<p><strong>4.时域信号7000个点采样，后端补1000个零，做8000点数的FFT</strong></p>
<p>​        为了解决这个问题，我们可以合理选择FFT的点数，以便这两个点能在频率轴上成为独立分开的点。由于，我们并不需要更好的波形频率分辨率，仅采用时域数据的零填充方式来调整FFT数据点的频率间隔。</p>
<p>​        给时域信号增加1000零值(10 us)，使得频率间隔为12.5 kHz，这样，满足了1 MHz and 1.05 MHz两个频率都是这个间隔的整数倍。</p>
<img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/195843v40p5fizttv54igf.jpg" style="zoom:67%;">
    </div>

    
    
    

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/%E4%BF%A1%E5%8F%B7%E5%A4%84%E7%90%86/" rel="tag"># 信号处理</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/2021/11/21/%E6%AF%AB%E7%B1%B3%E6%B3%A2%E9%9B%B7%E8%BE%BE%E6%B5%8B%E8%B7%9D%E5%8E%9F%E7%90%86/" rel="prev" title="毫米波雷达测距原理">
      <i class="fa fa-chevron-left"></i> 毫米波雷达测距原理
    </a></div>
      <div class="post-nav-item">
    <a href="/2021/11/22/FFT%E8%A1%A5%E9%9B%B6%E5%AF%B9%E6%97%81%E7%93%A3%E7%9A%84%E5%BD%B1%E5%93%8D/" rel="next" title="FFT补零对旁瓣的影响">
      FFT补零对旁瓣的影响 <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          
    <div class="comments" id="valine-comments"></div>

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%BB%80%E4%B9%88%E6%98%AF%E8%A1%A5%E9%9B%B6"><span class="nav-number">1.</span> <span class="nav-text">什么是补零</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E6%B3%A2%E5%BD%A2%E5%88%86%E8%BE%A8%E7%8E%87%E5%92%8CFFT%E5%88%86%E8%BE%A8%E7%8E%87"><span class="nav-number">2.</span> <span class="nav-text">波形分辨率和FFT分辨率</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%AE%9E%E4%BE%8B%E5%88%86%E6%9E%90"><span class="nav-number">3.</span> <span class="nav-text">实例分析</span></a></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
  <p class="site-author-name" itemprop="name">xudonglei</p>
  <div class="site-description" itemprop="description">搬砖 嵌入式</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">283</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">19</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
          
        <span class="site-state-item-count">67</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2024</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">xudonglei</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://muse.theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Muse</a> 强力驱动
  </div>

        








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/muse.js"></script>


<script src="/js/next-boot.js"></script>




  




  
<script src="/js/local-search.js"></script>













  

  


<script>
NexT.utils.loadComments(document.querySelector('#valine-comments'), () => {
  NexT.utils.getScript('//unpkg.com/valine/dist/Valine.min.js', () => {
    var GUEST = ['nick', 'mail', 'link'];
    var guest = 'nick,mail,link';
    guest = guest.split(',').filter(item => {
      return GUEST.includes(item);
    });
    new Valine({
      el         : '#valine-comments',
      verify     : false,
      notify     : false,
      appId      : 'BT0Qw9HcTpPv1a6cT1iDBXKz-gzGzoHsz',
      appKey     : 'LMCMh8v02JTMFAwKNRcgoizI',
      placeholder: "Just go go",
      avatar     : 'mm',
      meta       : guest,
      pageSize   : '10' || 10,
      visitor    : true,
      lang       : 'zh-CN' || 'zh-cn',
      path       : location.pathname,
      recordIP   : false,
      serverURLs : ''
    });
  }, window.Valine);
});
</script>

</body>
</html>
